
clear all

use "Estimation Sample.dta" 



set more off



egen cd=group(country date)

 
xtset id2

*++++++++++++++++
*+   AT, 2009  ++
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


preserve 

egen cmt=group(country month treataf)
tabulate cmt, gen(b)



*Product
reghdfe dlogunits i.presub3af9##ib1.treataf i.presub2af9##ib1.treataf i.presub1af9##ib1.treataf i.sub1af9##ib1.treataf i.sub2af9##ib1.treataf i.sub3af9##ib1.treataf i.sub4af9##ib1.treataf i.postsub1af9##ib1.treataf i.postsub2af9##ib1.treataf i.postsub3af9##ib1.treataf  mage mage2 , absorb(id2 cmt) cluster(id) 
		est store subu

*Country-date
reghdfe dlogunits i.presub3af9##ib1.treataf i.presub2af9##ib1.treataf i.presub1af9##ib1.treataf i.sub1af9##ib1.treataf i.sub2af9##ib1.treataf i.sub3af9##ib1.treataf i.sub4af9##ib1.treataf i.postsub1af9##ib1.treataf i.postsub2af9##ib1.treataf i.postsub3af9##ib1.treataf  mage mage2 , absorb(id2 cmt) cluster(cd) 	
est store subu1

*Country
reghdfe dlogunits i.presub3af9##ib1.treataf i.presub2af9##ib1.treataf i.presub1af9##ib1.treataf i.sub1af9##ib1.treataf i.sub2af9##ib1.treataf i.sub3af9##ib1.treataf i.sub4af9##ib1.treataf i.postsub1af9##ib1.treataf i.postsub2af9##ib1.treataf i.postsub3af9##ib1.treataf  mage mage2 , absorb(id2 cmt) cluster(country)
est store subu2
 
*Country id
reghdfe dlogunits i.presub3af9##ib1.treataf i.presub2af9##ib1.treataf i.presub1af9##ib1.treataf i.sub1af9##ib1.treataf i.sub2af9##ib1.treataf i.sub3af9##ib1.treataf i.sub4af9##ib1.treataf i.postsub1af9##ib1.treataf i.postsub2af9##ib1.treataf i.postsub3af9##ib1.treataf  mage mage2 , absorb(id2 cmt) cluster(country id) 
est store subu3

esttab   subu subu2 subu1 subu3   , se star(* 0.10 ** 0.05 *** 0.01) mtitles nogaps scalars(N ) order(1.presub2af9 1.presub1af9 1.sub1af9 1.sub2af9 1.sub3af9 1.sub4af9 1.postsub1af9 1.postsub2af9) keep(1.presub2af9 1.presub1af9 1.sub1af9 1.sub2af9 1.sub3af9 1.sub4af9 1.postsub1af9 1.postsub2af9) 

****WILD BOOTSTRAP


xtset id2
xtreg dlogunits i.presub3af9##ib1.treataf i.presub2af9##ib1.treataf i.presub1af9##ib1.treataf i.sub1af9##ib1.treataf i.sub2af9##ib1.treataf i.sub3af9##ib1.treataf i.sub4af9##ib1.treataf i.postsub1af9##ib1.treataf i.postsub2af9##ib1.treataf i.postsub3af9##ib1.treataf  mage mage2 b1-b192 , fe

set seed 220981211


*Wild bootstrap, country cluster, restricted
		boottest        {1.presub2af9} {1.presub1af9} {1.sub1af9} {1.sub2af9} {1.sub3af9} {1.sub4af9} {1.postsub1af9} {1.postsub2af9} , cluster(country) nograph  reps (999999) weight (webb)	
*Wild bootstrap, country cluster, unrestricted
		boottest        {1.presub2af9} {1.presub1af9} {1.sub1af9} {1.sub2af9} {1.sub3af9} {1.sub4af9} {1.postsub1af9} {1.postsub2af9} , cluster(country) nograph  reps (999999) weight (webb) 	nonull
*Wild bootstrap, country-date cluster, restricted
		boottest        {1.presub2af9} {1.presub1af9} {1.sub1af9} {1.sub2af9} {1.sub3af9} {1.sub4af9} {1.postsub1af9} {1.postsub2af9} , cluster(cd) 	 nograph  noci
*Wild bootstrap, country-date cluster, unrestricted
		boottest        {1.presub2af9} {1.presub1af9} {1.sub1af9} {1.sub2af9} {1.sub3af9} {1.sub4af9} {1.postsub1af9} {1.postsub2af9} , cluster(cd) 	 nograph  							 	nonull		
*Subcluster bootstrap by product, restricted
		boottest        {1.presub2af9} {1.presub1af9} {1.sub1af9} {1.sub2af9} {1.sub3af9} {1.sub4af9} {1.postsub1af9} {1.postsub2af9} , cluster(id) 	 nograph  
*Subcluster bootstrap by product, unrestricted
		boottest        {1.presub2af9} {1.presub1af9} {1.sub1af9} {1.sub2af9} {1.sub3af9} {1.sub4af9} {1.postsub1af9} {1.postsub2af9} , cluster(id) 	 nograph 								nonull
*Subcluster bootstrap by product-country, restricted
		boottest        {1.presub2af9} {1.presub1af9} {1.sub1af9} {1.sub2af9} {1.sub3af9} {1.sub4af9} {1.postsub1af9} {1.postsub2af9} , cluster(id1) 	 nograph  noci
*Subcluster bootstrap by product-country, unrestricted
		boottest        {1.presub2af9} {1.presub1af9} {1.sub1af9} {1.sub2af9} {1.sub3af9} {1.sub4af9} {1.postsub1af9} {1.postsub2af9} , cluster(id1) 	 nograph 								nonull
		
		
restore		

*+++++++++++++++++++
*+  AT, 2010, FF  ++
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
preserve 

egen cmt=group(country month treataf)
tabulate cmt, gen(b)


*Product
reghdfe dlogunits i.presub3af10##ib1.treataf i.presub2af10##ib1.treataf i.presub1af10##ib1.treataf i.sub1af10##ib1.treataf i.sub2af10##ib1.treataf i.sub3af10##ib1.treataf i.postsub1af10##ib1.treataf i.postsub2af10##ib1.treataf i.postsub3af10##ib1.treataf  mage mage2 , absorb(id2 cmt) cluster(id)
est store subu

*Country-date
reghdfe dlogunits i.presub3af10##ib1.treataf i.presub2af10##ib1.treataf i.presub1af10##ib1.treataf i.sub1af10##ib1.treataf i.sub2af10##ib1.treataf i.sub3af10##ib1.treataf i.postsub1af10##ib1.treataf i.postsub2af10##ib1.treataf i.postsub3af10##ib1.treataf  mage mage2 , absorb(id2 cmt) cluster(cd)
est store subu1

*Country
reghdfe dlogunits i.presub3af10##ib1.treataf i.presub2af10##ib1.treataf i.presub1af10##ib1.treataf i.sub1af10##ib1.treataf i.sub2af10##ib1.treataf i.sub3af10##ib1.treataf i.postsub1af10##ib1.treataf i.postsub2af10##ib1.treataf i.postsub3af10##ib1.treataf  mage mage2 , absorb(id2 cmt) cluster(country)
est store subu2

*Country and id
reghdfe dlogunits i.presub3af10##ib1.treataf i.presub2af10##ib1.treataf i.presub1af10##ib1.treataf i.sub1af10##ib1.treataf i.sub2af10##ib1.treataf i.sub3af10##ib1.treataf i.postsub1af10##ib1.treataf i.postsub2af10##ib1.treataf i.postsub3af10##ib1.treataf  mage mage2 , absorb(id2 cmt) cluster(country id)
est store subu3

esttab  subu subu2 subu1 subu3  , se star(* 0.10 ** 0.05 *** 0.01) mtitles nogaps  scalars(N ) order(1.presub2af10 1.presub1af10 1.sub1af10 1.sub2af10 1.sub3af10 1.postsub1af10 1.postsub2af10) keep(1.presub2af10 1.presub1af10 1.sub1af10 1.sub2af10 1.sub3af10 1.postsub1af10 1.postsub2af10) 

****WILD BOOTSTRAP

xtset id2
xtreg dlogunits  i.presub2af10##ib1.treataf i.presub1af10##ib1.treataf i.sub1af10##ib1.treataf i.sub2af10##ib1.treataf i.sub3af10##ib1.treataf i.postsub1af10##ib1.treataf i.postsub2af10##ib1.treataf  mage mage2 b1-b192 , fe

set seed 210721054

*Wild bootstrap, country cluster, restricted
		boottest        {1.presub2af10} {1.presub1af10} {1.sub1af10} {1.sub2af10} {1.sub3af10}  {1.postsub1af10} {1.postsub2af10} , cluster(country) nograph  reps (999999) weight (webb)
*Wild bootstrap, country cluster, unrestricted
		boottest        {1.presub2af10} {1.presub1af10} {1.sub1af10} {1.sub2af10} {1.sub3af10}  {1.postsub1af10} {1.postsub2af10} , cluster(country) nograph  reps (999999) weight (webb) nonull	
*Wild bootstrap, country-date cluster, restricted
		boottest        {1.presub2af10} {1.presub1af10} {1.sub1af10} {1.sub2af10} {1.sub3af10}  {1.postsub1af10} {1.postsub2af10} , cluster(cd) 	   nograph  noci
*Wild bootstrap, country-date cluster, unrestricted
		boottest        {1.presub2af10} {1.presub1af10} {1.sub1af10} {1.sub2af10} {1.sub3af10}  {1.postsub1af10} {1.postsub2af10} , cluster(cd) 	   nograph  							nonull	
*Subcluster bootstrap by product, restricted
		boottest        {1.presub2af10} {1.presub1af10} {1.sub1af10} {1.sub2af10} {1.sub3af10}  {1.postsub1af10} {1.postsub2af10} , cluster(id) 	   nograph
*Subcluster bootstrap by product, unrestricted
		boottest        {1.presub2af10} {1.presub1af10} {1.sub1af10} {1.sub2af10} {1.sub3af10}  {1.postsub1af10} {1.postsub2af10} , cluster(id) 	   nograph 								nonull
*Subcluster bootstrap by country-product, restricted
		boottest        {1.presub2af10} {1.presub1af10} {1.sub1af10} {1.sub2af10} {1.sub3af10}  {1.postsub1af10} {1.postsub2af10} , cluster(id1) 	   nograph  noci
*Subcluster bootstrap by country-product, unrestricted
		boottest        {1.presub2af10} {1.presub1af10} {1.sub1af10} {1.sub2af10} {1.sub3af10}  {1.postsub1af10} {1.postsub2af10} , cluster(id1) 	   nograph 								nonull

		
restore

*+++++++++++++++++++
*+  AT, 2010, WM  ++	
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
preserve

egen cmt=group(country month treata)
tabulate cmt, gen(b)

*Product
reghdfe dlogunits i.presub3a##ib1.treata i.presub2a##ib1.treata i.presub1a##ib1.treata i.sub1a##ib1.treata i.sub2a##ib1.treata i.postsub1a##ib1.treata i.postsub2a##ib1.treata i.postsub3a##ib1.treata  mage mage2 , absorb(id2 cmt) cluster(id) 
est store subu
		
*Country-date
reghdfe dlogunits i.presub3a##ib1.treata i.presub2a##ib1.treata i.presub1a##ib1.treata i.sub1a##ib1.treata i.sub2a##ib1.treata i.postsub1a##ib1.treata i.postsub2a##ib1.treata  i.postsub3a##ib1.treata mage mage2 , absorb(id2 cmt) cluster(cd) 
est store subu1

*Country
reghdfe dlogunits i.presub3a##ib1.treata i.presub2a##ib1.treata i.presub1a##ib1.treata i.sub1a##ib1.treata i.sub2a##ib1.treata i.postsub1a##ib1.treata i.postsub2a##ib1.treata  i.postsub3a##ib1.treata mage mage2 , absorb(id2 cmt) cluster(country)
est store subu2

*Country and id
reghdfe dlogunits i.presub3a##ib1.treata i.presub2a##ib1.treata i.presub1a##ib1.treata i.sub1a##ib1.treata i.sub2a##ib1.treata i.postsub1a##ib1.treata i.postsub2a##ib1.treata  i.postsub3a##ib1.treata mage mage2 , absorb(id2 cmt) cluster(country id) 
est store subu3

esttab  subu subu2 subu1 subu3  , se star(* 0.10 ** 0.05 *** 0.01) mtitles nogaps scalars(N ) order(1.presub2a 1.presub1a 1.sub1a 1.sub2a 1.postsub1a 1.postsub2a ) keep(1.presub2a 1.presub1a 1.sub1a 1.sub2a 1.postsub1a 1.postsub2a)


****WILD BOOTSTRAP


xtset id2

xtreg dlogunits i.presub2a##ib1.treata i.presub1a##ib1.treata i.sub1a##ib1.treata i.sub2a##ib1.treata i.postsub1a##ib1.treata i.postsub2a##ib1.treata mage mage2 b1-b132 , fe

set seed 987654321

*Wild bootstrap, country cluster, restricted
		boottest        {1.presub2a} {1.presub1a} {1.sub1a} {1.sub2a}  {1.postsub1a} {1.postsub2a}, cluster(country) nograph  reps (999999) weight (webb)
*Wild bootstrap, country cluster, unrestricted
		boottest        {1.presub2a} {1.presub1a} {1.sub1a} {1.sub2a}  {1.postsub1a} {1.postsub2a}, cluster(country) nograph  reps (999999) weight (webb) 	nonull	
*Wild bootstrap, country-date cluster, restricted
		boottest        {1.presub2a} {1.presub1a} {1.sub1a} {1.sub2a}  {1.postsub1a} {1.postsub2a}, cluster(cd) 	 nograph  noci
*Wild bootstrap, country-date cluster, unrestricted
		boottest        {1.presub2a} {1.presub1a} {1.sub1a} {1.sub2a}  {1.postsub1a} {1.postsub2a}, cluster(cd) 	 nograph  							 	nonull	
*Subcluster bootstrap by product, restricted
		boottest        {1.presub2a} {1.presub1a} {1.sub1a} {1.sub2a}  {1.postsub1a} {1.postsub2a}, cluster(id) 	 nograph
*Subcluster bootstrap by product, unrestricted
		boottest        {1.presub2a} {1.presub1a} {1.sub1a} {1.sub2a}  {1.postsub1a} {1.postsub2a}, cluster(id) 	 nograph 								nonull
*Subcluster bootstrap by country-product, restricted
		boottest        {1.presub2a} {1.presub1a} {1.sub1a} {1.sub2a}  {1.postsub1a} {1.postsub2a}, cluster(id1) 	 nograph   noci
*Subcluster bootstrap by country-product, unrestricted
		boottest        {1.presub2a} {1.presub1a} {1.sub1a} {1.sub2a}  {1.postsub1a} {1.postsub2a}, cluster(id1) 	 nograph 								nonull
		
restore

*++++++++++++++
*+  HU, 2015 ++
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

preserve 

egen cmt=group(country month treath)
tabulate cmt, gen(b)

*Product
reghdfe dlogunits i.presub3h##ib1.treath i.presub2h##ib1.treath i.presub1h##ib1.treath i.sub1h##ib1.treath i.sub2h##ib1.treath i.sub3h##ib1.treath i.sub4h##ib1.treath i.postsub1h##ib1.treath i.postsub2h##ib1.treath i.postsub3h##ib1.treath mage mage2  if country!="Croatia", absorb(id2 cmt) cluster(id) 
est store subu

*Country-date
reghdfe dlogunits i.presub3h##ib1.treath i.presub2h##ib1.treath i.presub1h##ib1.treath i.sub1h##ib1.treath i.sub2h##ib1.treath i.sub3h##ib1.treath i.sub4h##ib1.treath i.postsub1h##ib1.treath i.postsub2h##ib1.treath i.postsub3h##ib1.treath mage mage2  if country!="Croatia", absorb(id2 cmt) cluster(cd) 
est store subu1

*Country
reghdfe dlogunits i.presub3h##ib1.treath i.presub2h##ib1.treath i.presub1h##ib1.treath i.sub1h##ib1.treath i.sub2h##ib1.treath i.sub3h##ib1.treath i.sub4h##ib1.treath i.postsub1h##ib1.treath i.postsub2h##ib1.treath i.postsub3h##ib1.treath mage mage2  if country!="Croatia", absorb(id2 cmt) cluster(country) 
est store subu2

*Country and id
reghdfe dlogunits i.presub3h##ib1.treath i.presub2h##ib1.treath i.presub1h##ib1.treath i.sub1h##ib1.treath i.sub2h##ib1.treath i.sub3h##ib1.treath i.sub4h##ib1.treath i.postsub1h##ib1.treath i.postsub2h##ib1.treath i.postsub3h##ib1.treath mage mage2  if country!="Croatia", absorb(id2 cmt) cluster(country id) 
est store subu3

esttab   subu subu2 subu1 subu3  , se star(* 0.10 ** 0.05 *** 0.01) mtitles nogaps  scalars(N ) order(1.presub2h 1.presub1h 1.sub1h 1.sub2h 1.sub3h 1.sub4h 1.postsub1h 1.postsub2h) keep(1.presub2h 1.presub1h 1.sub1h 1.sub2h 1.sub3h 1.sub4h 1.postsub1h 1.postsub2h)


xtset id2

xtreg dlogunits i.presub3h##ib1.treath i.presub2h##ib1.treath i.presub1h##ib1.treath i.sub1h##ib1.treath i.sub2h##ib1.treath i.sub3h##ib1.treath i.sub4h##ib1.treath i.postsub1h##ib1.treath i.postsub2h##ib1.treath i.postsub3h##ib1.treath mage mage2 b1-b132  if country!="Croatia", fe

****WILD BOOTSTRAP

set seed 3456789

*Wild bootstrap, country cluster, restricted
		boottest        {1.presub2h} {1.presub1h} {1.sub1h} {1.sub2h} {1.sub3h} {1.sub4h} {1.postsub1h} {1.postsub2h} , cluster(country) nograph  reps (999999) weight (webb)
*Wild bootstrap, country cluster, unrestricted
		boottest        {1.presub2h} {1.presub1h} {1.sub1h} {1.sub2h} {1.sub3h} {1.sub4h} {1.postsub1h} {1.postsub2h} , cluster(country) nograph  reps (999999) weight (webb) 	nonull	
*Wild bootstrap, country-date cluster, restricted
		boottest        {1.presub2h} {1.presub1h} {1.sub1h} {1.sub2h} {1.sub3h} {1.sub4h} {1.postsub1h} {1.postsub2h} , cluster(cd) 	 nograph  noci
*Wild bootstrap, country-date cluster, unrestricted
		boottest        {1.presub2h} {1.presub1h} {1.sub1h} {1.sub2h} {1.sub3h} {1.sub4h} {1.postsub1h} {1.postsub2h} , cluster(cd) 	 nograph  							 	nonull	
*Subcluster bootstrap by product, restricted
		boottest        {1.presub2h} {1.presub1h} {1.sub1h} {1.sub2h} {1.sub3h} {1.sub4h} {1.postsub1h} {1.postsub2h} , cluster(id) 	 nograph
*Subcluster bootstrap by product, unrestricted
		boottest        {1.presub2h} {1.presub1h} {1.sub1h} {1.sub2h} {1.sub3h} {1.sub4h} {1.postsub1h} {1.postsub2h} , cluster(id) 	 nograph 								nonull
*Subcluster bootstrap by country-product, restricted
		boottest        {1.presub2h} {1.presub1h} {1.sub1h} {1.sub2h} {1.sub3h} {1.sub4h} {1.postsub1h} {1.postsub2h} , cluster(id1) 	 nograph  noci
*Subcluster bootstrap by country-product, unrestricted
		boottest        {1.presub2h} {1.presub1h} {1.sub1h} {1.sub2h} {1.sub3h} {1.sub4h} {1.postsub1h} {1.postsub2h} , cluster(id1) 	 nograph 								nonull

restore

*++++++++++++++
*+  HU, 2016 ++
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

preserve

egen cmt=group(country month treathf)
tabulate cmt, gen(b)

*Product
reghdfe dlogunits i.presub3hf##ib1.treathf i.presub2hf##ib1.treathf i.presub1hf##ib1.treathf i.sub1hf##ib1.treathf i.sub2hf##ib1.treathf i.sub3hf##ib1.treathf i.sub4hf##ib1.treathf i.postsub1hf##ib1.treathf  mage mage2 , absorb(id2 cmt) cluster(id)
est store subu

*Country-date
reghdfe dlogunits i.presub3hf##ib1.treathf i.presub2hf##ib1.treathf i.presub1hf##ib1.treathf i.sub1hf##ib1.treathf i.sub2hf##ib1.treathf i.sub3hf##ib1.treathf i.sub4hf##ib1.treathf i.postsub1hf##ib1.treathf  mage mage2 , absorb(id2 cmt) cluster(cd)
est store subu1

*Country
reghdfe dlogunits i.presub3hf##ib1.treathf i.presub2hf##ib1.treathf i.presub1hf##ib1.treathf i.sub1hf##ib1.treathf i.sub2hf##ib1.treathf i.sub3hf##ib1.treathf i.sub4hf##ib1.treathf i.postsub1hf##ib1.treathf  mage mage2 , absorb(id2 cmt) cluster(country)
est store subu2

*Country and id
reghdfe dlogunits i.presub3hf##ib1.treathf i.presub2hf##ib1.treathf i.presub1hf##ib1.treathf i.sub1hf##ib1.treathf i.sub2hf##ib1.treathf i.sub3hf##ib1.treathf i.sub4hf##ib1.treathf i.postsub1hf##ib1.treathf  mage mage2 , absorb(id2 cmt) cluster(country id)
est store subu3

esttab   subu subu2 subu1 subu3  , se star(* 0.10 ** 0.05 *** 0.01) mtitles nogaps scalars(N ) order(1.presub2hf 1.presub1hf 1.sub1hf 1.sub2hf 1.sub3hf 1.sub4hf 1.postsub1hf 1.postsub2hf) keep(1.presub2hf 1.presub1hf 1.sub1hf 1.sub2hf 1.sub3hf 1.sub4hf 1.postsub1hf 1.postsub2hf)


xtreg dlogunits i.presub3hf##ib1.treathf i.presub2hf##ib1.treathf i.presub1hf##ib1.treathf i.sub1hf##ib1.treathf i.sub2hf##ib1.treathf i.sub3hf##ib1.treathf i.sub4hf##ib1.treathf i.postsub1hf##ib1.treathf    mage mage2 b1-b132 , fe

****WILD BOOTSTRAP


*Wild bootstrap, country cluster, restricted
		boottest        {1.presub2hf} {1.presub1hf} { 1.sub1hf} { 1.sub2hf} {1.sub3hf} {1.sub4hf} {1.postsub1hf} , cluster(country) nograph  reps (999999) weight (webb)
*Wild bootstrap, country cluster, unrestricted
		boottest        {1.presub2hf} {1.presub1hf} { 1.sub1hf} { 1.sub2hf} {1.sub3hf} {1.sub4hf} {1.postsub1hf} , cluster(country) nograph  reps (999999) weight (webb) 	nonull	
*Wild bootstrap, country-date cluster, restricted
		boottest        {1.presub2hf} {1.presub1hf} { 1.sub1hf} { 1.sub2hf} {1.sub3hf} {1.sub4hf} {1.postsub1hf} , cluster(cd) 	 nograph  noci
*Wild bootstrap, country-date cluster, unrestricted
		boottest        {1.presub2hf} {1.presub1hf} { 1.sub1hf} { 1.sub2hf} {1.sub3hf} {1.sub4hf} {1.postsub1hf} , cluster(cd) 	 nograph  							 		nonull	
*Subcluster bootstrap by product, restricted
		boottest        {1.presub2hf} {1.presub1hf} { 1.sub1hf} { 1.sub2hf} {1.sub3hf} {1.sub4hf} {1.postsub1hf} , cluster(id) 	 nograph
*Subcluster bootstrap by product, unrestricted
		boottest        {1.presub2hf} {1.presub1hf} { 1.sub1hf} { 1.sub2hf} {1.sub3hf} {1.sub4hf} {1.postsub1hf} , cluster(id) 	 nograph 									nonull
*Subcluster bootstrap by country-product, restricted
		boottest        {1.presub2hf} {1.presub1hf} { 1.sub1hf} { 1.sub2hf} {1.sub3hf} {1.sub4hf} {1.postsub1hf} , cluster(id1)  nograph noci
*Subcluster bootstrap by country-product, unrestricted
		boottest        {1.presub2hf} {1.presub1hf} { 1.sub1hf} { 1.sub2hf} {1.sub3hf} {1.sub4hf} {1.postsub1hf} , cluster(id1)  nograph 									nonull
		
restore

*++++++++++++++
*+  HR, 2015 ++
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

preserve 

egen cmt=group(country month treatc)
tabulate cmt, gen(b)
	
	
*Product	
reghdfe dlogunits i.presub3c##ib1.treatc i.presub2c##ib1.treatc i.presub1c##ib1.treatc i.sub1c##ib1.treatc i.postsub1c##ib1.treatc i.postsub2c##ib1.treatc i.postsub3c##ib1.treatc i.postsub4c##ib1.treatc i.postsub5c##ib1.treatc i.postsub6c##ib1.treatc  i.postsub7c##ib1.treatc mage mage2  if country!="Hungary" , absorb (id2 cmt) cluster(id)
est store subu
	
*Country-date
reghdfe dlogunits  i.presub2c##ib1.treatc i.presub1c##ib1.treatc i.sub1c##ib1.treatc i.postsub1c##ib1.treatc i.postsub2c##ib1.treatc i.postsub3c##ib1.treatc i.postsub4c##ib1.treatc i.postsub5c##ib1.treatc i.postsub6c##ib1.treatc  mage mage2  if country!="Hungary" , absorb (id2 cmt) cluster(cd)
est store subu1

*Country
reghdfe dlogunits  i.presub2c##ib1.treatc i.presub1c##ib1.treatc i.sub1c##ib1.treatc i.postsub1c##ib1.treatc i.postsub2c##ib1.treatc i.postsub3c##ib1.treatc i.postsub4c##ib1.treatc i.postsub5c##ib1.treatc i.postsub6c##ib1.treatc   mage mage2  if country!="Hungary" , absorb (id2 cmt) cluster(country)
est store subu2

*Country and id
reghdfe dlogunits  i.presub2c##ib1.treatc i.presub1c##ib1.treatc i.sub1c##ib1.treatc i.postsub1c##ib1.treatc i.postsub2c##ib1.treatc i.postsub3c##ib1.treatc i.postsub4c##ib1.treatc i.postsub5c##ib1.treatc i.postsub6c##ib1.treatc   mage mage2  if country!="Hungary" , absorb (id2 cmt) cluster(country id)
est store subu3

esttab   subu subu2 subu1 subu3 , se star(* 0.10 ** 0.05 *** 0.01) mtitles nogaps b(%8.3f) t(%6.2f)  scalars(N ) order(1.presub2c 1.presub1c 1.sub1c 1.postsub1c 1.postsub2c 1.postsub3c 1.postsub4c 1.postsub5c 1.postsub6c) keep(1.presub2c 1.presub1c 1.sub1c 1.postsub1c 1.postsub2c 1.postsub3c 1.postsub4c 1.postsub5c 1.postsub6c) 


****WILD BOOTSTRAP

xtset id2

xtreg dlogunits  i.presub2c##ib1.treatc i.presub1c##ib1.treatc i.sub1c##ib1.treatc i.postsub1c##ib1.treatc i.postsub2c##ib1.treatc i.postsub3c##ib1.treatc i.postsub4c##ib1.treatc i.postsub5c##ib1.treatc i.postsub6c##ib1.treatc  mage mage2 b1-b192 if country!="Hungary" , fe

*Wild bootstrap, country cluster, restricted
		boottest        {1.presub2c} {1.presub1c} {1.sub1c} {1.postsub1c} {1.postsub2c} {1.postsub3c} {1.postsub4c} {1.postsub5c} {1.postsub6c} , cluster(country) nograph  reps (999999) weight (webb)
*Wild bootstrap, country cluster, unrestricted
		boottest        {1.presub2c} {1.presub1c} {1.sub1c} {1.postsub1c} {1.postsub2c} {1.postsub3c} {1.postsub4c} {1.postsub5c} {1.postsub6c} , cluster(country) nograph  reps (999999) weight (webb) 	nonull	
*Wild bootstrap, country-date cluster, restricted
		boottest        {1.presub2c} {1.presub1c} {1.sub1c} {1.postsub1c} {1.postsub2c} {1.postsub3c} {1.postsub4c} {1.postsub5c} {1.postsub6c} , cluster(cd) 	 nograph  noci
*Wild bootstrap, country-date cluster, unrestricted
		boottest        {1.presub2c} {1.presub1c} {1.sub1c} {1.postsub1c} {1.postsub2c} {1.postsub3c} {1.postsub4c} {1.postsub5c} {1.postsub6c} , cluster(cd) 	 nograph  							 		nonull	
*Subcluster bootstrap by product, restricted
		boottest        {1.presub2c} {1.presub1c} {1.sub1c} {1.postsub1c} {1.postsub2c} {1.postsub3c} {1.postsub4c} {1.postsub5c} {1.postsub6c} , cluster(id) 	 nograph
*Subcluster bootstrap by product, unrestricted
		boottest        {1.presub2c} {1.presub1c} {1.sub1c} {1.postsub1c} {1.postsub2c} {1.postsub3c} {1.postsub4c} {1.postsub5c} {1.postsub6c} , cluster(id) 	 nograph 									nonull
*Subcluster bootstrap by product-country, restricted
		boottest        {1.presub2c} {1.presub1c} {1.sub1c} {1.postsub1c} {1.postsub2c} {1.postsub3c} {1.postsub4c} {1.postsub5c} {1.postsub6c} , cluster(id1) 	 nograph  noci
*Subcluster bootstrap by product-country, unrestricted
		boottest        {1.presub2c} {1.presub1c} {1.sub1c} {1.postsub1c} {1.postsub2c} {1.postsub3c} {1.postsub4c} {1.postsub5c} {1.postsub6c} , cluster(id1) 	 nograph 									nonull		
		
restore		
		
		

